package com.bnyy.bean.event;

import android.util.Log;

import java.util.HashSet;

/**
 * Author : 关炳鹏
 * Description :
 * Date : 2022/6/1
 **/
public class PermissionEvent extends Event<String, Object> {

    public static final String TAG = "PermissionEvent";
    private HashSet<String> granteds = new HashSet<>();
    private HashSet<String> denieds = new HashSet<>();

    public PermissionEvent() {
        super("PermissionEvent");
    }

    public PermissionEvent(String tag) {
        super(tag);
        Log.e("PermissionEvent", "tag = " + tag);
    }

    public HashSet<String> getGranteds() {
        return granteds;
    }

    public PermissionEvent setGranteds(HashSet<String> granteds) {
        this.granteds = granteds;
        return this;
    }

    public PermissionEvent setGranteds(String granted) {
        if (granteds == null) {
            granteds = new HashSet<>();
        }
        granteds.add(granted);
        return this;
    }

    public HashSet<String> getDenieds() {
        return denieds;
    }

    public PermissionEvent setDenieds(HashSet<String> denieds) {
        this.denieds = denieds;
        return this;
    }
}
